#include <iostream>

using namespace std ;

void split_url (const string& url)
{

    size_t i1 = url.find (':') ;

    size_t i2 = i1 + 3 ;

	size_t i3 = url.find ('/', i2) ;

	if (i3 != string::npos)
    {

        cout << url.substr (0 , i1) << endl ;

        cout << url.substr (i2, i3-i2) << endl ;

        cout << url.substr (i3+1) << endl ;

    }

    cout << endl ;

}

int main ()
{

    string url1 = "http://legacy.cplusplus.com/reference/string/string/" ;

    split_url (url1) ;

    return 0 ;

}